package com.lzx.dormsys.service.impl;

import com.github.pagehelper.PageInfo;
import com.lzx.dormsys.bean.RoleGroupBeanExample;
import com.lzx.dormsys.bean.RoleGroupMenusBeanExample;
import com.lzx.dormsys.bean.RoleGroupMenusBeanKey;
import com.lzx.dormsys.mapper.RoleGroupMenusBeanMapper;
import com.lzx.dormsys.service.RoleGroupMenusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleGroupMenusServiceImpl implements RoleGroupMenusService {
    @Autowired
    RoleGroupMenusBeanMapper roleGroupMenusBeanMapper;

    @Override
    public int insert(RoleGroupMenusBeanKey roleGroupMenusBeanKey) {
        return 0;
    }

    @Override
    public int update(RoleGroupMenusBeanKey roleGroupMenusBeanKey) {
        return 0;
    }

    @Override
    public List<RoleGroupMenusBeanKey> queryData(RoleGroupMenusBeanKey roleGroupMenusBeanKey) {
        RoleGroupMenusBeanExample example = new RoleGroupMenusBeanExample();
        RoleGroupMenusBeanExample.Criteria criteria = example.createCriteria();
        if(roleGroupMenusBeanKey!=null){
            if(roleGroupMenusBeanKey.getGroupid()!=null){
                criteria.andGroupidEqualTo(roleGroupMenusBeanKey.getGroupid());
            }
        }
        return roleGroupMenusBeanMapper.selectByExample(example);
    }

    @Override
    public PageInfo<RoleGroupMenusBeanKey> queryData(RoleGroupMenusBeanKey roleGroupMenusBeanKey, int pageSize, int pageNum) {
        return null;
    }

    @Override
    public int deleteByPrimaryKey(RoleGroupMenusBeanKey roleGroupMenusBeanKey) {
        return 0;
    }

    @Override
    public int deleteByPrimaryKey(String id) {
        return 0;
    }
}
